using System.Collections;
using System.Collections.Generic;
using UnityEngine;


public class CellData
{
    public int CellMineText;
    public bool IsMine;
    public bool IsFlip;
    public bool IsHide;
    public int index;

    public CellData(int cellMineText, bool isMine, bool isFlip, bool isHide,int index)
    {
        this.CellMineText = cellMineText;
        this.IsMine = isMine;
        this.IsFlip = isFlip;
        this.IsHide = isHide;
        this.index = index;
    }
}


public class LevelManager : Singleton<LevelManager>
{
    public List<Level> levelList = new List<Level>();
    public int currentLevelIndex = 0;

    public void SwitchLevel(int i)
    {
        currentLevelIndex = i;
        var uiGameStart = UIManager.Instance.GetUI("GameStart") as UIGameStart;
        uiGameStart.ResumeButtonSwitch(SaveManager.Instance.CheckLevelExist(currentLevelIndex));
        Debug.LogFormat("Switching level : {0} , ResumeButtonSwitchOn : {1}",currentLevelIndex, SaveManager.Instance.CheckLevelExist(currentLevelIndex));
    }

    public Level GetCurrentLevel()
    {
        return levelList[currentLevelIndex];
    }
}
